﻿using Prism.Navigation;

namespace Prism.Regions.Navigation;

/// <summary>
/// Provides methods to perform navigation.
/// </summary>
/// <remarks>
/// Convenience overloads for the methods in this interface can be found as extension methods on the 
/// <see cref="NavigationAsyncExtensions"/> class.
/// </remarks>
public interface INavigateAsync
{
    /// <summary>
    /// Initiates navigation to the target specified by the <see cref="Uri"/>.
    /// </summary>
    /// <param name="target">The navigation target</param>
    /// <param name="navigationCallback">The callback executed when the navigation request is completed.</param>
    /// <remarks>
    /// Convenience overloads for this method can be found as extension methods on the 
    /// <see cref="NavigationAsyncExtensions"/> class.
    /// </remarks>
    void RequestNavigate(Uri target, Action<IRegionNavigationResult> navigationCallback);

    /// <summary>
    /// Initiates navigation to the target specified by the <see cref="Uri"/>.
    /// </summary>
    /// <param name="target">The navigation target</param>
    /// <param name="navigationCallback">The callback executed when the navigation request is completed.</param>
    /// <param name="navigationParameters">The navigation parameters specific to the navigation request.</param>
    /// <remarks>
    /// Convenience overloads for this method can be found as extension methods on the 
    /// <see cref="NavigationAsyncExtensions"/> class.
    /// </remarks>
    void RequestNavigate(Uri target, Action<IRegionNavigationResult> navigationCallback, INavigationParameters navigationParameters);
}
